<?php
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use app\modules\core\widgets\SlideNav;
?>
<div class="container-fluid">
	<div class="row">
        <?= SlideNav::widget() ?>
		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 col-lg-10 col-lg-offset-2 main">
            <?= Breadcrumbs::widget([
                'homeLink' => ['label' => 'HOME', 'url' => '/core'],
                'links' => [
                    ['label' => '模型', 'url' => '/core/model/list'],
                    '查看',
                ]
            ]) ?>

                <div class="row">
                    <div class="col-md-12 col-lg-12">
                        <div class="alert alert-warning" role="alert">
                            <button type="button" class="close" data-dismiss="alert">×</button>
                            <strong>警告!</strong> 请注意你的个人隐私安全.
                        </div>


                        <form class="form-horizontal">
                            <input type="hidden" value="<?php echo $model->id; ?>"></input>
                        	<div class="form-group">
                        		<label class="col-md-1 control-label" for="ID">ID</label>
                        		<div class="col-md-2 controls">
                        		    <div class="col-md-2 controls">
                                        <p class=""><?php echo $model->id; ?></p>
                        		    </div>
                        		</div>
                        	</div>
                        	<div class="form-group">
                        		<label class="col-md-1 control-label" for="modelName">模型名称</label>
                        		<div class="col-md-2 controls">
                        			<input id="modelName" name="modelName" type="text" class="form-control" value="<?php echo $model->modelName; ?>" />
                        		</div>
                        	</div>
                            <div class="form-group">
                        		<label class="col-md-1 control-label" for="desc">模型描述</label>
                        		<div class="col-md-2 controls">
                        			<input id="modelName" name="desc" type="text" class="form-control" value="<?php echo $model->desc; ?>" />
                        		</div>
                        	</div>
                        	<div class="form-group">
                        		<label class="col-md-1 control-label" for="modelName">字段列表</label>
                        		<div class="col-md-4 controls">
                                    <?php foreach ($model->getFieldSet() as $field) { ?>
                        		        <div class="list-group-item">
                                            <span><?php echo $field->name; ?></span>
                                            <span><?php echo $field->desc; ?></span>
                                            <span class="glyphicon glyphicon-remove pull-right"></span>
                                        </div>
                                    <?php } ?>
                        		</div>
                        	</div>
                            <div class="form-group">
                        		<div class="col-md-12 controls">
                                    <a class="btn btn-primary" href="/core/model/delete?id=<?= $model->id ?>">删除</a>
                                    <a class="btn btn-primary" href="/core/model/edit?id=<?= $model->id ?>">编辑</a>
                        		</div>
                        	</div>
                        </form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
